package com.guoxin.mashibing;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * @author guoxin
 * @date 2019/7/9
 */
public class BlockingContainer<T> {
    private static final int MAX = 10;

    private final LinkedList<T> list = new LinkedList<>();

    public synchronized void put() {

    }

    public synchronized T get() {
        if (list.size() <= 0) {
            try {
                this.wait();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        return list.removeFirst();
    }

}
